﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Celltest
{
    public class Position
    {
        public int X;
        public int Y;

        public Position(int x = 0, int y = 0)
        {
            if (x < 1)
                x = 0;
            if (y < 1)
                y = 0;

            if (y >= Console.WindowHeight - 1)
                y = Console.WindowHeight- 2;

            if (x >= Console.WindowWidth - 1)
                x = Console.WindowWidth - 2;


            this.X = x;
            this.Y = y;

        }
    }
}
